﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="MantenedorUsuario.aspx.vb" Inherits="Forecast.Webforms.MantenedorUsuario" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="menu" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="body" runat="server">
    <table id="TABLE3" runat="server" style="width: 100%; height: 100%">
        <tr>
            <td colspan="3" style="width: 100%" valign="top">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table id="TABLE_prim" runat="server" style="width: 100%">
                <tr>
                    <td style="text-align: center">
                        <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/fl_whosonline.gif" OnClick="ImageButton1_Click" ValidationGroup="Novalidar" /><br />
                        <asp:LinkButton ID="LkBtnCrearNuevo" runat="server" OnClick="LkBtnCrearNuevo_Click" ValidationGroup="Novalidar">Crear 
                        Nuevo Usuario</asp:LinkButton>
                        
                        <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/images/card.png" 
                            OnClick="ImageButton2_Click" ValidationGroup="Novalidar" Visible="False" />
                      
                        <asp:LinkButton ID="LkBtnEditar" runat="server" OnClick="LkBtnEditar_Click" 
                            ValidationGroup="Novalidar" Visible="False">Editar Usuario</asp:LinkButton>
                        <asp:UpdateProgress ID="UpdateProgress1" runat="server">
                            <ProgressTemplate>
                                <img src="images/ajax-loader.gif" /><asp:Label ID="Label102" runat="server" 
                                    Font-Size="XX-Small" Text="Updating Page ....."></asp:Label>
                            </ProgressTemplate>
                        </asp:UpdateProgress>
                    </td>
                </tr>
              
            </table>
            <table id="TbIngreso" runat="server" style="border-right: #dedaff thin solid; border-top: #dedaff thin solid;
                border-left: #dedaff thin solid; width: 847px; border-bottom: #dedaff thin solid;
                background-color: #f7f8ff" visible="false">
                <tr>
                    <td class="FondTAb" colspan="2" 
                        
                        style="font-size: small; font-family: verdana; background-color: #DADADA; font-weight: bold;">
                        <asp:Label ID="Label3" runat="server" Text="CUENTAS DE USUARIOS"></asp:Label></td>
                </tr>
                <tr>
                    <td style="font-size: x-small; background-color: #D6DDFC;">
                        Nombre y Apellido</td>
                    <td>
                        <asp:TextBox ID="txtnombre" runat="server" CssClass="TextFond" MaxLength="80" TabIndex="1"
                            Width="200px"></asp:TextBox>
                        <asp:Label ID="Label2" runat="server" Font-Size="XX-Small" ForeColor="Blue" Text="*"></asp:Label>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtnombre"
                            ErrorMessage="*" Font-Size="X-Small"></asp:RequiredFieldValidator>&nbsp;
                        <asp:Label ID="Label103" runat="server" Text="Apellido"></asp:Label>
                        <asp:TextBox ID="txtApellido" runat="server" CssClass="TextFond" Width="200px"></asp:TextBox>
                    </td>
                </tr>
                <tr style="font-size: 12pt; color: #555555">
                    <td style="font-size: x-small; font-family: Verdana; background-color: #D6DDFC;">
                        Correo Electrónico</td>
                    <td>
                        <asp:TextBox ID="TxtEmail" runat="server" CssClass="TextFond" MaxLength="79" 
                            TabIndex="2" Width="348px"></asp:TextBox>
                        <asp:Label ID="Label5" runat="server" Font-Size="XX-Small" ForeColor="Blue" Text="*"></asp:Label>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator22" runat="server" ControlToValidate="TxtEmail"
                            ErrorMessage="*" Font-Size="X-Small"></asp:RequiredFieldValidator></td>
                </tr>
                <tr style="font-size: 12pt; color: #555555">
                    <td style="font-size: x-small; font-family: Verdana; background-color: #D6DDFC;">
                        Dirección</td>
                    <td>
                        <asp:TextBox ID="TxtDireccion" runat="server" CssClass="TextFond" TabIndex="3"
                            Width="350px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td style="font-size: x-small; font-family: Verdana; background-color: #D6DDFC;">
                        Teléfono</td>
                    <td>
                        <asp:TextBox ID="TxtFono" runat="server"
                                CssClass="TextFond" MaxLength="15" TabIndex="5"
                                Width="140px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td style="font-size: x-small; font-family: Verdana; background-color: #D6DDFC;">
                        Teléfono Móvil</td>
                    <td>
                        <asp:TextBox ID="TxtFonoMovil" runat="server" CssClass="TextFond" 
                            MaxLength="20" TabIndex="6"
                            Width="140px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td style="font-size: x-small; font-family: Verdana; background-color: #D6DDFC;">
                        Parcela</td>
                    <td>
                        <asp:TextBox ID="txtParcela" runat="server" CssClass="TextFond" Width="140px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="font-size: x-small; font-family: Verdana; background-color: #D6DDFC;">
                        <asp:Label ID="Label1" runat="server" Font-Size="X-Small" Text="Medidor"></asp:Label></td>
                    <td>
                        <asp:TextBox ID="txtMedidor" runat="server" CssClass="TextFond" Width="140px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="font-size: x-small; font-family: Verdana; background-color: #D6DDFC;">
                        Rut</td>
                    <td>
                        <asp:TextBox ID="TxtRut" runat="server" CssClass="TextFond" MaxLength="20" TabIndex="9"
                            Width="140px"></asp:TextBox>
                        <asp:Label ID="Label8" runat="server" Font-Size="XX-Small" ForeColor="Blue" Text="*"></asp:Label>
                        <asp:Label ID="Label9" runat="server" Font-Size="X-Small" ForeColor="Red" Text="Login de usuario ya existe. Por favor ingrese otro Login"
                            Visible="False"></asp:Label></td>
                </tr>
              
                <tr>
                    <td style="font-size: x-small; font-family: Verdana; background-color: #D6DDFC;">
                        <asp:Label ID="LblMantencion" runat="server" Text="Mantención"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="Txtmantencion" runat="server" CssClass="TextFond" 
                            Width="140px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="font-size: x-small; font-family: Verdana; background-color: #D6DDFC;">
                        <asp:Label ID="LblCargoFijo" runat="server" Text="Cargo Fijo"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="TxtcargoFijo" runat="server" CssClass="TextFond" Width="140px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="font-size: x-small; font-family: Verdana; background-color: #D6DDFC;">
                        <asp:Label ID="LblArriendo" runat="server" Text="Arriendo"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtArriendo" runat="server" CssClass="TextFond" Width="140px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="font-size: x-small; font-family: Verdana; background-color: #D6DDFC;">
                        <asp:Label ID="LblActivo" runat="server" Text="Activo"></asp:Label></td>
                    <td>
                        <asp:CheckBox ID="ChActivo" runat="server" /></td>
                </tr>
               
                <tr>
                    <td>
                        <asp:Button ID="BtnCancelar" runat="server"  TabIndex="12"
                            Text="<< Atrás" OnClick="BtnCancelar_Click" Width="72px" 
                            CssClass="art-button" /></td>
                    <td>
                        <asp:Button ID="BtnGuardarIngreso" runat="server" TabIndex="11"
                            Text="Guardar" CssClass="art-button" OnClick="BtnGuardarIngreso_Click1" />&nbsp;
                        <asp:Button ID="BtnReanudar" runat="server"  Text="Reanudar Clave" 
                            CssClass="art-button-l" OnClick="BtnReanudar_Click" Visible="False" />
                        <asp:Button ID="BtnCrearUser" runat="server" TabIndex="10" Text="Crear Usuario" 
                            Visible="False" OnClick="BtnCrearUser_Click" CssClass="art-button" />
                        <asp:Button ID="btncambiarClave" runat="server" Text="Cambiar Clave" 
                            CssClass="art-button" />
                    </td>
                </tr>
            </table>
            <asp:Label ID="Label4" runat="server" BackColor="LightGoldenrodYellow" Font-Bold="False"
                Font-Size="X-Small" ForeColor="Black" Height="22px" Text="Label" Visible="False"
                Width="100%"></asp:Label>
            <asp:ObjectDataSource ID="ObjectDataSourceCARGO" runat="server" SelectMethod="CargaSol"
                TypeName="CapPl">
                <SelectParameters>
                    <asp:Parameter DefaultValue="CARGO" Name="ConsultaTipo" Type="String" />
                    <asp:Parameter DefaultValue="0" Name="CampoAlt" Type="Int16" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <asp:ObjectDataSource ID="ObjectDataSourceGerenteCargo" runat="server" SelectMethod="CargaSol"
                TypeName="CapPl">
                <SelectParameters>
                    <asp:Parameter DefaultValue="GerenteCARGO" Name="ConsultaTipo" Type="String" />
                    <asp:Parameter DefaultValue="0" Name="CampoAlt" Type="Int16" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <asp:ObjectDataSource ID="ObjectDataSourcePROCESOCARGO" runat="server" SelectMethod="CargaSol"
                TypeName="CapPl">
                <SelectParameters>
                    <asp:Parameter DefaultValue="SOLICITUD_TODAS" Name="ConsultaTipo" Type="String" />
                    <asp:Parameter DefaultValue="0" Name="CampoAlt" Type="Int16" />
                </SelectParameters>
            </asp:ObjectDataSource>
    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
        <ContentTemplate>
            <table id="TABLE2" runat="server" style="width: 847px; border-right: #dedaff thin solid; border-top: #dedaff thin solid; border-left: #dedaff thin solid; border-bottom: #dedaff thin solid; background-color: #f7f8ff;">
                <tr>
                    <td colspan="3" valign="top">
                        <table id="Tb_deBusqeda" runat="server" style="width: 100%" cellpadding="0" cellspacing="1">
                            <tr>
                                <td class="FondTAb" colspan="3">
                                    <asp:Label ID="Label10" runat="server" Font-Bold="True" Font-Size="X-Small" Font-Strikeout="False"
                                        Font-Underline="True" Text="Editar Usuario"></asp:Label></td>
                            </tr>
                            <tr>
                                <td colspan="3">
                                    <asp:Label ID="Lbbuscar" runat="server" Font-Bold="False" Font-Size="X-Small" Text="Buscar"></asp:Label></td>
                            </tr>
                            <tr>
                                <td colspan="3">
                                    <asp:TextBox ID="txt_Busqueda" runat="server" CssClass="TextFond" Width="500px"></asp:TextBox>
                                    <asp:Button ID="btn_buscar" runat="server" CssClass="art-button" Text="Buscar" 
                                        OnClick="btn_buscar_Click" /></td>
                            </tr>
                            <tr>
                                <td colspan="3">
                                    <table id="TbResultadoBusqueda" runat="server" cellpadding="0" cellspacing="0" style="width: 100%"
                                        visible="false">
                                        <tr>
                                            <td colspan="3" style="background-color: white">
                        <asp:Panel ID="Panel1" runat="server" Height="380px" ScrollBars="Both" Width="100%" 
                                                    Font-Names="Verdana">
                        
                        
                        
                            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="grid"
                                Width="100%" OnRowCommand="GridView1_RowCommand" OnRowDataBound="GridView1_RowDataBound">
                                <Columns>
                                    <asp:BoundField DataField="IdUsuario" HeaderText="IdUsuario" 
                                        SortExpression="IdUsuario">
                                        <HeaderStyle Font-Size="XX-Small" />
                                        <ItemStyle Width="20px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="IdRole" HeaderText="IdRole" SortExpression="IdRole">
                                        <ItemStyle Font-Size="XX-Small" />
                                        <HeaderStyle Font-Size="XX-Small" Width="120px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="DesRole" HeaderText="DesRole" SortExpression="DesRole">
                                        <ItemStyle Font-Size="XX-Small" />
                                        <HeaderStyle Font-Size="XX-Small" Width="120px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Username" HeaderText="Username" 
                                        SortExpression="Username">
                                        <ItemStyle Font-Size="XX-Small" />
                                        <HeaderStyle Font-Size="XX-Small" Width="150px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Password" HeaderText="Password" SortExpression="Password"
                                        Visible="False">
                                        <ItemStyle Font-Size="XX-Small" />
                                        <HeaderStyle Font-Size="XX-Small" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name">
                                        <ItemStyle Font-Size="XX-Small" />
                                        <HeaderStyle Font-Size="XX-Small" Width="80px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="IdEntityF" HeaderText="IdEntityF" SortExpression="IdEntityF"
                                        Visible="False">
                                        <ItemStyle Font-Size="XX-Small" />
                                        <HeaderStyle Font-Size="XX-Small" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="DesEntity" HeaderText="DesEntity" SortExpression="DesEntity">
                                        <ItemStyle Font-Size="XX-Small" />
                                        <HeaderStyle Font-Size="XX-Small" />
                                    </asp:BoundField>
                                    <asp:CommandField ButtonType="Image" SelectImageUrl="~/images/icon-pencil.jpg" 
                                        ShowSelectButton="True" Visible="False">
                                        <ItemStyle Width="30px" />
                                    </asp:CommandField>
                                    <asp:CommandField HeaderText="Eliminar" ShowDeleteButton="True" Visible="False">
                                        <HeaderStyle Font-Size="XX-Small" />
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:CommandField>
                                    <asp:ButtonField Text="Editar">
                                        <ItemStyle Width="30px" />
                                    </asp:ButtonField>
                                </Columns>
                            </asp:GridView>
                        </asp:Panel>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
        </ContentTemplate>
    </asp:UpdatePanel>
            </td>
        </tr>
        </table>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="script" runat="server">
</asp:Content>
